(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
S tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c5, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38

(3) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
S tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c5, c7, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
We considered the (Usable) Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
s(ok(z0)) → ok(s(z0))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
And the Tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [3]   
POL(ACTIVE(x1)) = 0   
POL(ADD(x1, x2)) = 0   
POL(AND(x1, x2)) = 0   
POL(CONS(x1, x2)) = 0   
POL(FIRST(x1, x2)) = 0   
POL(FROM(x1)) = 0   
POL(IF(x1, x2, x3)) = 0   
POL(PROPER(x1)) = 0   
POL(S(x1)) = 0   
POL(TOP(x1)) = [4]x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = [1] + [4]x1 + x2   
POL(and(x1, x2)) = [2] + x1 + [4]x2   
POL(c10(x1, x2)) = x1 + x2   
POL(c11(x1, x2)) = x1 + x2   
POL(c12(x1, x2)) = x1 + x2   
POL(c13(x1, x2)) = x1 + x2   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c23(x1, x2, x3)) = x1 + x2 + x3   
POL(c26(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(c27(x1, x2, x3)) = x1 + x2 + x3   
POL(c29(x1, x2)) = x1 + x2   
POL(c30(x1, x2, x3)) = x1 + x2 + x3   
POL(c32(x1, x2, x3)) = x1 + x2 + x3   
POL(c33(x1, x2)) = x1 + x2   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(c37(x1, x2)) = x1 + x2   
POL(c38(x1, x2)) = x1 + x2   
POL(c5(x1, x2)) = x1 + x2   
POL(c7(x1, x2)) = x1 + x2   
POL(c8(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = 0   
POL(false) = 0   
POL(first(x1, x2)) = [1] + [5]x1 + x2   
POL(from(x1)) = [1]   
POL(if(x1, x2, x3)) = [4] + [4]x1 + x2 + x3   
POL(mark(x1)) = [1] + x1   
POL(nil) = [4]   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(true) = [1]   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
S tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c5, c7, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8

(7) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1)) by

ACTIVE(add(s(mark(z0)), z1)) → c5(S(mark(add(z0, z1))), ADD(mark(z0), z1))
ACTIVE(add(s(ok(z0)), ok(z1))) → c5(S(ok(add(z0, z1))), ADD(ok(z0), ok(z1)))
ACTIVE(add(s(x0), x1)) → c5

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(S(mark(add(z0, z1))), ADD(mark(z0), z1))
ACTIVE(add(s(ok(z0)), ok(z1))) → c5(S(ok(add(z0, z1))), ADD(ok(z0), ok(z1)))
ACTIVE(add(s(x0), x1)) → c5
S tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(S(mark(add(z0, z1))), ADD(mark(z0), z1))
ACTIVE(add(s(ok(z0)), ok(z1))) → c5(S(ok(add(z0, z1))), ADD(ok(z0), ok(z1)))
ACTIVE(add(s(x0), x1)) → c5
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c7, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c5, c5

(9) CdtUnreachableProof (EQUIVALENT transformation)

The following tuples could be removed as they are not reachable from basic start terms:

ACTIVE(add(s(ok(z0)), ok(z1))) → c5(S(ok(add(z0, z1))), ADD(ok(z0), ok(z1)))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(S(mark(add(z0, z1))), ADD(mark(z0), z1))
ACTIVE(add(s(x0), x1)) → c5
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(S(mark(add(z0, z1))), ADD(mark(z0), z1))
ACTIVE(add(s(x0), x1)) → c5
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM, TOP, ACTIVE, PROPER

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c37, c38, c7, c9, c10, c11, c12, c13, c8, c5, c5, c23, c26, c27, c29, c30, c32, c33

(11) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

ACTIVE(add(s(x0), x1)) → c5

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(S(mark(add(z0, z1))), ADD(mark(z0), z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(S(mark(add(z0, z1))), ADD(mark(z0), z1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM, TOP, ACTIVE, PROPER

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c37, c38, c7, c9, c10, c11, c12, c13, c8, c5, c23, c26, c27, c29, c30, c32, c33

(13) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
S tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM, TOP, ACTIVE, PROPER

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c37, c38, c7, c9, c10, c11, c12, c13, c8, c23, c26, c27, c29, c30, c32, c33, c5

(15) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0)) by

TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(true)) → c37(TOP(ok(true)), PROPER(true))
TOP(mark(false)) → c37(TOP(ok(false)), PROPER(false))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c37(TOP(ok(0)), PROPER(0))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(nil)) → c37(TOP(ok(nil)), PROPER(nil))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(mark(x0)) → c37

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(true)) → c37(TOP(ok(true)), PROPER(true))
TOP(mark(false)) → c37(TOP(ok(false)), PROPER(false))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c37(TOP(ok(0)), PROPER(0))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(nil)) → c37(TOP(ok(nil)), PROPER(nil))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(mark(x0)) → c37
S tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM, TOP, ACTIVE, PROPER

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c38, c7, c9, c10, c11, c12, c13, c8, c23, c26, c27, c29, c30, c32, c33, c5, c37, c37

(17) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

TOP(mark(x0)) → c37

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(true)) → c37(TOP(ok(true)), PROPER(true))
TOP(mark(false)) → c37(TOP(ok(false)), PROPER(false))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c37(TOP(ok(0)), PROPER(0))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(nil)) → c37(TOP(ok(nil)), PROPER(nil))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
S tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM, TOP, ACTIVE, PROPER

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c38, c7, c9, c10, c11, c12, c13, c8, c23, c26, c27, c29, c30, c32, c33, c5, c37

(19) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing tuple parts

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(mark(true)) → c37(TOP(ok(true)))
TOP(mark(false)) → c37(TOP(ok(false)))
TOP(mark(0)) → c37(TOP(ok(0)))
TOP(mark(nil)) → c37(TOP(ok(nil)))
S tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM, TOP, ACTIVE, PROPER

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c38, c7, c9, c10, c11, c12, c13, c8, c23, c26, c27, c29, c30, c32, c33, c5, c37, c37

(21) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0)) by

TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))
TOP(ok(x0)) → c38

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(mark(true)) → c37(TOP(ok(true)))
TOP(mark(false)) → c37(TOP(ok(false)))
TOP(mark(0)) → c37(TOP(ok(0)))
TOP(mark(nil)) → c37(TOP(ok(nil)))
TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))
TOP(ok(x0)) → c38
S tuples:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))
TOP(ok(x0)) → c38
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM, ACTIVE, PROPER, TOP

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c7, c9, c10, c11, c12, c13, c8, c23, c26, c27, c29, c30, c32, c33, c5, c37, c37, c38, c38

(23) CdtUnreachableProof (EQUIVALENT transformation)

The following tuples could be removed as they are not reachable from basic start terms:

ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
ACTIVE(add(s(mark(z0)), z1)) → c5(ADD(mark(z0), z1))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))

(24) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(true)) → c37(TOP(ok(true)))
TOP(mark(false)) → c37(TOP(ok(false)))
TOP(mark(0)) → c37(TOP(ok(0)))
TOP(mark(nil)) → c37(TOP(ok(nil)))
TOP(ok(x0)) → c38
S tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(x0)) → c38
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM, TOP

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c37, c38

(25) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 5 leading nodes:

TOP(mark(true)) → c37(TOP(ok(true)))
TOP(mark(false)) → c37(TOP(ok(false)))
TOP(mark(0)) → c37(TOP(ok(0)))
TOP(mark(nil)) → c37(TOP(ok(nil)))
TOP(ok(x0)) → c38

(26) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(27) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
We considered the (Usable) Rules:none
And the Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ADD(x1, x2)) = [5]x2   
POL(AND(x1, x2)) = [4]x2   
POL(CONS(x1, x2)) = [3]x1 + [4]x2   
POL(FIRST(x1, x2)) = 0   
POL(FROM(x1)) = [2]x1   
POL(IF(x1, x2, x3)) = [2]x2   
POL(S(x1)) = [3]x1   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(mark(x1)) = [5]   
POL(ok(x1)) = [1] + x1   

(28) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
K tuples:

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(29) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
We considered the (Usable) Rules:none
And the Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ADD(x1, x2)) = 0   
POL(AND(x1, x2)) = [4]x2   
POL(CONS(x1, x2)) = 0   
POL(FIRST(x1, x2)) = 0   
POL(FROM(x1)) = [2]x1   
POL(IF(x1, x2, x3)) = [4]x1 + [4]x3   
POL(S(x1)) = 0   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(mark(x1)) = [4] + x1   
POL(ok(x1)) = [2] + x1   

(30) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
K tuples:

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(31) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

AND(mark(z0), z1) → c14(AND(z0, z1))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ADD(x1, x2)) = [4]x1 + [3]x2   
POL(AND(x1, x2)) = [4]x1   
POL(CONS(x1, x2)) = [4]x1 + [3]x2   
POL(FIRST(x1, x2)) = [4]x1   
POL(FROM(x1)) = [3]x1   
POL(IF(x1, x2, x3)) = [4]x1 + [3]x3   
POL(S(x1)) = [4]x1   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(mark(x1)) = [4] + x1   
POL(ok(x1)) = [1] + x1   

(32) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
K tuples:

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
AND(mark(z0), z1) → c14(AND(z0, z1))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(33) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ADD(x1, x2)) = [4]x1 + [2]x2   
POL(AND(x1, x2)) = [4]x1   
POL(CONS(x1, x2)) = [3]x2   
POL(FIRST(x1, x2)) = [4]x1 + x2   
POL(FROM(x1)) = [2]x1   
POL(IF(x1, x2, x3)) = [4]x3   
POL(S(x1)) = [3]x1   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(mark(x1)) = [1] + x1   
POL(ok(x1)) = x1   

(34) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:none
K tuples:

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
AND(mark(z0), z1) → c14(AND(z0, z1))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(35) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(36) BOUNDS(O(1), O(1))